window: Only draw resize grip if its window exists
authorBenjamin Otte <otte@redhat.com>
Mon, 23 May 2011 13:46:59 +0000 (15:46 +0200)
committerBenjamin Otte <otte@redhat.com>
Mon, 23 May 2011 13:56:09 +0000 (15:56 +0200)
Don't rely on priv->resize_grip_visible as the code comment in the
variable declaration indicates.
This fixes warnings with GtkPlug, which can cause resize_grip_visible to
be TRUE but grid_window to be NULL - running tests/teststatusicon
reproduces this.

This broke with 7ef113ce56a75641175af31267e2075f634267e0

gtk/gtkwindow.c

index 2af5409bdd98c70d67c4d37281d7e9ee386285c1..cf476ac6a7448b28e5dc7d627e10da1a71d13b29 100644 (file)
@@ -7400,7 +7400,7 @@ gtk_window_draw (GtkWidget *widget,
   if (GTK_WIDGET_CLASS (gtk_window_parent_class)->draw)
     ret = GTK_WIDGET_CLASS (gtk_window_parent_class)->draw (widget, cr);
 
-  if (priv->resize_grip_visible &&
+  if (priv->grip_window &&
       gtk_cairo_should_draw_window (cr, priv->grip_window))
     {
       GdkRectangle rect;